﻿namespace XBD.MsgServicePro
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var order = new Order 
            { 
                Id = 123,
                DatePlaced = DateTime.Now,
                TotalPrice = 30f
            };

            OrderProcessor orderProcesser = new OrderProcessor();
            //注册邮箱服务
            MailService mailService = new MailService();
            orderProcesser.RegisterNotification(mailService);
            //注册短信服务
            SmsMessageService smsService = new SmsMessageService();
            orderProcesser.RegisterNotification(smsService);

            orderProcesser.Process();
            //Console.WriteLine("Hello, World!");
        }
    }
}
